<template>
  <view class="page">
    <auth-login :agree="agree" @success="onSuccess" />
    <agree-item v-model="agree" style="position: fixed; bottom: 180rpx; width: 100%" />
    <view
      style="
        position: fixed;
        bottom: 40rpx;
        width: 100%;
        text-align: center;
        font-size: 20rpx;
        color: #adadad;
      ">
      本应用仅向同策内部员工提供服务
    </view>
  </view>
</template>

<script setup>
  import { ref } from 'vue'
  import agreeItem from './components/agree.vue'
  import authLogin from './components/auth.vue'

  const agree = ref(false)
  const emits = defineEmits(['success'])

  function onSuccess() {
    uni.reLaunch({
      url: '/pages/index/index'
    })
  }
</script>

<style lang="scss" scoped>
  .btn {
    position: fixed;
    bottom: 146rpx;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 32rpx;
    color: #f33c3c;
    font-family: PingFangSC-Medium, PingFang SC;
  }
</style>
